home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / angelpang.swf / scripts / frame_3 / PlaceObject2_267_190 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-13  |  1.8 KB  |  74 lines

  1. onClipEvent(enterFrame){
  2.    if(_parent.move_play)
  3.    {
  4.       if(ishit)
  5.       {
  6.          if(this._x > 632 || this._x < 0)
  7.          {
  8.             ishit = false;
  9.             this.play();
  10.          }
  11.          if(this.hit.hitTest(_parent.hero.Hit))
  12.          {
  13.             _parent.canPlay = false;
  14.             _parent.player_move = false;
  15.             _parent.hero.gotoAndStop("die");
  16.          }
  17.          g += _parent.GGG;
  18.          this._x += speedX;
  19.          sn = Math.abs(Math.cos(3.141592653589793 * g / 180));
  20.          this._y = _parent.Hit._y + 45 - sn * dis;
  21.          if(g % 360 == 90 || g % 360 == 270)
  22.          {
  23.             dis = 120;
  24.          }
  25.          if(this.hitTest(_parent.hit_L))
  26.          {
  27.             speedX = 3 + zzz_num;
  28.          }
  29.          if(this.hitTest(_parent.hit_R))
  30.          {
  31.             speedX = -3 + (- zzz_num);
  32.          }
  33.       }
  34.    }
  35.    if(Att_hit)
  36.    {
  37.       if(this.hitTest(_parent.arrow_1.hit))
  38.       {
  39.          _parent.arrow_1.gotoAndStop(1);
  40.          this.play();
  41.       }
  42.       if(this.hitTest(_parent.arrow_2.hit))
  43.       {
  44.          _parent.arrow_2.gotoAndStop(1);
  45.          this.play();
  46.       }
  47.       if(this.hitTest(_parent.arrow_3.hit))
  48.       {
  49.          _parent.arrow_3.gotoAndStop(1);
  50.          this.play();
  51.       }
  52.       if(this.hitTest(_parent.arrow_4.hit))
  53.       {
  54.          _parent.arrow_4.gotoAndStop(1);
  55.          this.play();
  56.       }
  57.       if(this.hitTest(_parent.arrow_5.hit))
  58.       {
  59.          _parent.arrow_5.gotoAndStop(1);
  60.          this.play();
  61.       }
  62.       if(this.hitTest(_parent.arrow_7.hit))
  63.       {
  64.          _parent.arrow_7.gotoAndStop(1);
  65.          this.play();
  66.       }
  67.       if(this.hitTest(_parent.arrow_8.hit))
  68.       {
  69.          _parent.arrow_8.gotoAndStop(1);
  70.          this.play();
  71.       }
  72.    }
  73. }
  74.